<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>::Happy - DTAC Prepaid Phone::</title>
<link href="${RESOURCE}/css/global.css" rel="stylesheet" type="text/css">
<link href="${RESOURCE}/css/global-en.css" rel="stylesheet" type="text/css">
<link href="${RESOURCE}/css/customize.css" rel="stylesheet" type="text/css">
<script language=JavaScript>
function printWindow(){
browserVersion = parseInt(navigator.appVersion)
if (browserVersion >= 4) window.print()
}

function include(xUrl,xId) {
  var xmlhttp = false;
  /*@cc_on @*/
  /*@if (@_jscript_version >= 5)

  // JScript gives us Conditional compilation, we can cope with old IE versions.
  // and security blocked creation of the objects.
  try {
    xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
   } catch (e) {
      try {
        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
      } catch (E) {
        xmlhttp = false;
      }
   }

  /*@end @*/
  if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
    xmlhttp = new XMLHttpRequest();
  }

  xmlhttp.open("GET", xUrl,true);
  xmlhttp.onreadystatechange=function() {
          if (xmlhttp.readyState==4) {
                document.getElementById(xId).innerHTML = xmlhttp.responseText;
          }
  }
  xmlhttp.send(null)
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
//-->
//var ERROR_SUBR_NUMB_FORMATE = "Special number has to start with 0 and must be 10 digits.<br>Please try again.";
var ERROR_SUBR_NUMB_FORMATE = "Mobile Number must have 10 digits and must be in numeric only.";
var ERROR_SUBR_NUMB_DUPLICATE = "You have chosen the same number as your existing one.\nPlease try again.";
var ERROR_SUBR_NUMB_DUPLICATE2 = "The number that you’ve selected is your own number.\nPlease try again.";
var ERROR_SUBR_NUMB_DUPLICATE3 = "Sorry, you entered the duplicate number.\nPls try again.";

/*function doSubmit(){

 	var d = document.form1;			  
         	var txtSpecialNo =  d.txtSpecialNoAdd.value;		
           if( ! checkSubrNumbFormate(txtSpecialNo) || isYourSubrNumbAdd(txtSpecialNo)){
            d.txtSpecialNoAdd.value = Trim(d.txtSpecialNoAdd.value);
            d.txtSpecialNoAdd.focus();
            if (ERROR_FORM.focus) {ERROR_FORM.focus()}

         }else{
	var txtSpecialNo =  d.txtSpecialNoAdd.value;
	var  confirmMsg = "<br><div align='center'><span class='textnormal'>Your special number is " + txtSpecialNo + "</span></dev>";
                     confirmMsg += "<br><br><br><div align='center'><span class='textnormal'>Please confirm this transaction.</span></dev><br><br>";
		if (txtSpecialNo != ""){
			confirmDialog(confirmMsg,  "500", "220"); 
		}
         }

}*/

function doSubmit(){
	var d = document.form1;	
	var txtSpecialNoAdd ="";
	if ('<!--SVLT.VAR:displayManySpecial-->' != "none"){
			 if( ! checkSubrNumbFormateAddMany() || isYourSubrNumbAddMany() || isDuplicateNoAddMany()){
				if (ERROR_FORM.focus) {ERROR_FORM.focus()}
				return;
			}else{
				for (i = 0; i < d.txtSpecialNoAddMany.length; i++)
				if (d.txtSpecialNoAddMany[i].value != ""){
				if(txtSpecialNoAdd == ""){
					txtSpecialNoAdd = txtSpecialNoAdd + d.txtSpecialNoAddMany[i].value;
				}else{
					txtSpecialNoAdd = txtSpecialNoAdd + ", " + d.txtSpecialNoAddMany[i].value;
				}
			
				}
			}
			
	}else {
			if( ! checkSubrNumbFormate(d.txtSpecialNoAdd.value) || isYourSubrNumbAdd(d.txtSpecialNoAdd.value)){
				d.txtSpecialNoAdd.value = Trim(d.txtSpecialNoAdd.value);
            				d.txtSpecialNoAdd.focus();
            				if (ERROR_FORM.focus) {ERROR_FORM.focus()}
				return;
			}else{
				txtSpecialNoAdd = d.txtSpecialNoAdd.value;
			}
			
	}	

	var  confirmMsg = "<br><div align='center'><span class='textnormal'>Your special number is " + txtSpecialNoAdd + "</span></dev>";
                     confirmMsg += "<br><br><br><div align='center'><span class='textnormal'>Please confirm this transaction.</span></dev><br><br>";
	confirmDialog(confirmMsg,  "500", "220");	
}

function informationDialog(msgParam,  w, h, bttnFunc){

	alert(msgParam);
//   if( w == "") w=400;
//   if(h == "") h=200;
//   var l = (screen.width - w) / 2; 
//   var t = (screen.height - h ) / 2;

   /*For window.open()*/ 
//   if( bttnFunc == "") bttnFunc="returnOk();";
//   msgRow = msgParam;   
//   bttnRow =   "<input type='image' src='${RESOURCE}/eng/images/14_webservice_submit.gif' onclick='javascript: "+bttnFunc+"' >";      
//   ERROR_FORM = window.open("/bp3/bin/DpromptShowMSG","tinyWindow", "width=" + w + ", height=" + h + ", top=" + t + ", left=" + l);              
}

function confirmDialog(msgParam,  w, h){
   w = 450;
   h = 240;
   var l = (screen.width - w) / 2; 
   var t = (screen.height - h ) / 2;
   msg = msgParam;
	document.forms[0].hdConfirmMsg.value = msg;
	window.open("/bp3/bin/DpromptSpecialNoConfirm?lang=E", "tinyWindow", "width=" + w + ", height=" + h + ", top=" + t + ", left=" + l);   
}

function checkSubrNumbFormate(subrNumb){
   var sPat = /^[0][0-9]{8,9}$/;
<!--SVLT.LOOP:DTAC_ONLY_FLAG-->
   sPat = /^[0][0-9]{9}$/;
<!--SVLT.END:DTAC_ONLY_FLAG-->

   if( Trim(subrNumb).length==0 ||  !sPat.test(subrNumb)){      				 
       informationDialog(ERROR_SUBR_NUMB_FORMATE, "" ,"", "" );
       return false;
   }else{
       return true;
   }
}

function checkSubrNumbFormateAddMany(){
   var sPat = /^[0][0-9]{8,9}$/;
<!--SVLT.LOOP:DTAC_ONLY_FLAG-->
   sPat = /^[0][0-9]{9}$/;
<!--SVLT.END:DTAC_ONLY_FLAG-->
 var d = document.form1;   
 var count =0;
	for(var i = 0; i< d.txtSpecialNoAddMany.length; i++){
		if( Trim(d.txtSpecialNoAddMany[i].value).length==0 ){      
       			count++;
   		}		
	} 
	if(count ==  d.txtSpecialNoAddMany.length){
		informationDialog(ERROR_SUBR_NUMB_FORMATE, "" ,"", "" );
		return false;
	}else{
		for(var i = 0; i< d.txtSpecialNoAddMany.length; i++){
			if( Trim(d.txtSpecialNoAddMany[i].value).length!=0){
				if(!sPat.test(d.txtSpecialNoAddMany[i].value)){      		 
       					informationDialog(ERROR_SUBR_NUMB_FORMATE, "" ,"", "" );
       					return false;
   				}
			}
		}
		return true;
	} 
	
}

function showAddSpecialNo(itemId){
         var d = document.form1;			
         document.getElementById ("tbShowDTACFlagOnly").style.display="";
         document.getElementById ("tbEditFee").style.display="none";
         document.getElementById ("tbAddFee").style.display="";						
         document.getElementById ("tbEditSpecialNo").style.display="";					
         document.getElementById ("tbEditSpecialNoBtn").style.display="none";	
         document.getElementById ("tbAddSpecialNoBtn").style.display="";		
         d.txtEditSpecialNo.value =  getExistNo(itemId);
         d.selectedRow.value = itemId;
         d.txtEditSpecialNo.focus();
}

function showEditSpecialNo(itemId){
         var d = document.form1;			
         document.getElementById ("tbShowDTACFlagOnly").style.display="";
         document.getElementById ("tbEditFee").style.display="";
         document.getElementById ("tbAddFee").style.display="none";						
         document.getElementById ("tbEditSpecialNo").style.display="";		
         document.getElementById ("tbEditSpecialNoBtn").style.display="";	
         document.getElementById ("tbAddSpecialNoBtn").style.display="none";			
         d.txtEditSpecialNo.value =  getExistNo(itemId);
         d.selectedRow.value = itemId;
         d.txtEditSpecialNo.focus();
}

function cancelAdd(){            
         var d = document.form1;
         d.txtEditSpecialNo.value = "";
         document.getElementById ("tbShowDTACFlagOnly").style.display="none";
         document.getElementById ("tbEditFee").style.display="none";
         document.getElementById ("tbAddFee").style.display="none";
         document.getElementById ("tbEditSpecialNo").style.display="none";	        
         document.getElementById ("tbAddSpecialNoBtn").style.display="none";	
         document.getElementById ("tbEditSpecialNoBtn").style.display="none";	

         d.ExistNo.value = "";
         d.NewNo.value = "";     		 
}

function addSpecialNo(){
         var d = document.form1;			             			
         var newNo = d.txtEditSpecialNo.value;			
         if( ! checkSubrNumbFormate(newNo) || isDuplicateNo(newNo) || isYourSubrNumb(newNo) ){
            d.txtEditSpecialNo.value = Trim(d.txtEditSpecialNo.value);
            d.txtEditSpecialNo.focus();
            if (ERROR_FORM.focus) {ERROR_FORM.focus()}
         }else{
            var newNo = d.txtEditSpecialNo.value;
            var  confirmMsg = "<br><div align='center'><span class='textnormal'>You want to add  </span><span class='textnormalred'> " +  newNo+ "<\span><span class='textnormal'>";
            <!--SVLT.LOOP:SHOW_FREE-->
            confirmMsg += "<br>Adding special number fee is </span><span class='textnormalred'><!--SVLT.VAR:FEE_AMNT--></span><span class='textnormal'> baht / special number";
            <!--SVLT.END:SHOW_FREE-->            
            confirmMsg += "<br><br>You will be able to call special number with special rate<br>after getting SMS confirmation from DTAC.</span></div>";
            confirmMsg += "<br><div align='center'><span class='textnormal'>Press ok to confirm your transaction.</span></dev><br><br>";

            d.ExistNo.value = "";
            d.NewNo.value = newNo; 
            d.MODE.value = "secondADD";
            //d.action="/bp3/bin/Dspc/DpromptSpecialNo";
            d.txtEditSpecialNo.focus();  
            confirmDialog(confirmMsg,  "500", "220");            
         }
}

function editSpecialNo(){

         var d = document.form1;			             
         var newNo = d.txtEditSpecialNo.value;						 
         if( ! checkSubrNumbFormate(newNo) || isDuplicateNo(newNo) || isYourSubrNumb(newNo) ){
            d.txtEditSpecialNo.value = Trim(d.txtEditSpecialNo.value);
            d.txtEditSpecialNo.focus();
            if (ERROR_FORM.focus) {ERROR_FORM.focus()}

         }else{
            var newNo = d.txtEditSpecialNo.value;
            var existNo = getExistNo( d.selectedRow.value );
	 var  confirmMsg = "<br><div align=center><span class='textnormal'>You want to change your special number ";
            confirmMsg += " from </span><span class='textnormalred'>" + existNo + "<\span><span class='textnormal'> to </span><spanclass='textnormalred'>" + newNo + "</span><span class='textnormal'>";
            <!--SVLT.LOOP:SHOW_FREE-->
           confirmMsg += "<br>Changing special number fee is </span><span class='textnormalred'><!--SVLT.VAR:FEE_AMNT--></span><span class='textnormal'> baht / special number";                           
           <!--SVLT.END:SHOW_FREE-->            
            confirmMsg += "<br><br>You will be able to call special number with special rate after getting SMS confirmation from dtac. </span></div>";
            confirmMsg += "<br><div align='center'><span class='textnormal'>Press ok to confirm your transaction.</span></dev><br><br>";

           d.ExistNo.value = existNo;
           d.NewNo.value = newNo;   
            //d.action="/bp3/bin/Dspc/DpromptSpecialNoChng";                   
          d.txtEditSpecialNo.focus();
            confirmDialog(confirmMsg,  "500", "220"); 

         }

}

function isDuplicateNo(newNo){
   var d = document.form1;                  
   var selectedRow = d.selectedRow.value;			
   var exitsNo = getExistNo(selectedRow);

   if(newNo == exitsNo){
      informationDialog(ERROR_SUBR_NUMB_DUPLICATE, "", "", "");
      return true;
   }else if( d.specialNo.length != null ) {				    
      for(i=0;i<d.specialNo.length; i++){
         exitsNo =  d.specialNo[i].value;
         if( exitsNo.length>0 && (newNo == exitsNo) ){
            informationDialog(ERROR_SUBR_NUMB_DUPLICATE, "", "", "");
            return true;
         }
      }
   }
   return false;
}

function isDuplicateNoAddMany(){
   var d = document.form1;                  
   if( d.txtSpecialNoAddMany.length > 0 ) {	
	for(var i = 0; i< d.txtSpecialNoAddMany.length; i++){
		for(var j = i+1 ; j < d.txtSpecialNoAddMany.length; j++){
			if(d.txtSpecialNoAddMany[i].value != "" || d.txtSpecialNoAddMany[j].value != ""){
				if(d.txtSpecialNoAddMany[i].value == d.txtSpecialNoAddMany[j].value){
					informationDialog(ERROR_SUBR_NUMB_DUPLICATE3, "", "", "");
           		 			return true;
				}
			}
		}
	} 
   }
   return false;
}

function isYourSubrNumb(newNo){
   var d = document.form1;                  
   var selectedRow = d.selectedRow.value;			
   var exitsNo = getExistNo(selectedRow);
   var yourSubrNumb = "<!--SVLT.VAR:subrNumb08-->";
   if(yourSubrNumb == newNo){
     informationDialog(ERROR_SUBR_NUMB_DUPLICATE2, "", "", "");
     return true;  
   }
   return false;
}

function isYourSubrNumbAdd(newNo){
   var d = document.form1;                  
   var yourSubrNumb = "<!--SVLT.VAR:subrNumb08-->";
   if(yourSubrNumb == newNo){
     informationDialog(ERROR_SUBR_NUMB_DUPLICATE2, "", "", "");
     return true;  
   }
   return false;
}

function isYourSubrNumbAddMany(){
   var d = document.form1;                  
   var yourSubrNumb = "<!--SVLT.VAR:subrNumb08-->";

      if( d.txtSpecialNoAddMany.length > 0 ) {	
	for(var i = 0; i< d.txtSpecialNoAddMany.length; i++){
		if(yourSubrNumb == d.txtSpecialNoAddMany[i].value){
     			informationDialog(ERROR_SUBR_NUMB_DUPLICATE2, "", "", "");
     			return true;  
   		}		
	} 
       }
   return false;
}

function getExistNo(itemId){
   var d = document.form1;
   var existNo="";
   if(d.specialNo.length==null){  
      existNo =  d.specialNo.value;
   }else{   
      existNo =  d.specialNo[itemId-1].value;  
   }				
   return existNo;
}

function gotoWelcome(){
   window.location = "/bp3/bin/Dspc/DpromptWelcome";   		
}

function LTrim(str){
   for(var i=0;str.charAt(i)==" ";i++);
       return str.substring(i,str.length);
}

function RTrim(str){
   for(var i=str.length-1;str.charAt(i)==" ";i--);
   return str.substring(0,i+1);
}

function Trim(str){return LTrim(RTrim(str));}

<!--

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

// Declaring required variables

var digits = "0123456789";



// non-digit characters which are allowed in phone numbers

var phoneNumberDelimiters = "()- ";



// characters which are allowed in international phone numbers

// (a leading + is OK)

var validWorldPhoneChars = phoneNumberDelimiters + "+";



// Minimum no of digits in an international phone no.

var minDigitsInIPhoneNumber = 10;



function isInteger(s)

{   var i;

    for (i = 0; i < s.length; i++)

    {   

        // Check that current character is number.

        var c = s.charAt(i);

        if (((c < "0") || (c > "9"))) return false;

    }



    // All characters are numbers.

    return true;

}



function stripCharsInBag(s, bag)

{   var i;

    var returnString = "";



    // Search through string's characters one by one.

    // If character is not in bag, append to returnString.

    for (i = 0; i < s.length; i++)

    {   

        // Check that current character isn't whitespace.

        var c = s.charAt(i);

        if (bag.indexOf(c) == -1) returnString += c;

    }



    return returnString;

}



function checkInternationalPhone(strPhone){

	s = stripCharsInBag(strPhone,validWorldPhoneChars);

	return (isInteger(s) && s.length >= minDigitsInIPhoneNumber);

}



function ValidateForm(){

	var Phone=document.form1.inputUserName;



	document.form1.submit();

 }



function MM_openBrWindow(theURL,winName,features) { //v2.0

  window.open(theURL,winName,features);

}





//-->

</script> 
</head>
<body>
<div id="header">
    <%@include file="../head.jsp" %>
</div>

<div id="container">
	<div id="pathway">
	<A href="/bp3/bin/DpromptIndex" class="link2">Web Service</A> &gt; 
	<a href="/bp3/bin/Dspc/DpromptWelcome"  class="link2">Profile and Service</a> &gt;  
	Special No
	</div>
	<div id="main">
    	<%@ include file="../menu.jsp" %>
    	<div id="content">
        	<div class="content-middle">
                
                <!--เนื้อหาเริ่มที่นี่-->
                <h3><img src="${RESOURCE}/eng/images/14_webservice_head01.gif"></h3>
               	<table width="100%" cellpadding="2" cellspacing="2" height="500">
                  	<tr>
                    	<td valign="top">
						
						
						
						<div align="center">
						
						
						

<form name="form1" method="post">

<input type="hidden" name="hdConfirmMsg" value="">

<input type="hidden" name="ExistNo" value="">

<input type="hidden" name="NewNo" value="">

<input name="func" type="hidden" id="func">

<input name="MODE" type="hidden" id="MODE" value="<!--SVLT.VAR:MODE-->">

<!--input type="hidden" name="subrNumb" value="<!--SVLT.VAR:HiddenSubrNumb-->"-->

 

                                <table width="650" border="0" align="center" cellpadding="0" cellspacing="0">

                                  <!--SVLT.VAR:CONF_TOP-->

                                  <tr> 

                                    <td> <table width="100%" border="0" cellspacing="3" cellpadding="0">

                                        <tr> 

                                          <td width="2%"><img src="${RESOURCE}/eng/images/14_webservice_bullet01.gif" width="9" height="9"></td>

                                          <td width="98%" class="textnormal_bold"><img src="${RESOURCE}/eng/images/14_webservice_subtitle05_2.gif" width="350" height="22"></td>

                                        </tr>

                                        <tr> 

                                          <td>&nbsp;</td>

                                          <td class="textnormal">Check, add and 
                                            change your Happy Special Number.</td>

                                        </tr>

                                      </table></td>

                                  </tr>

                                  <tr> 

                                    <td height="15" align="center"><br> <br> <br></td>

                                  </tr>

                                  <tr> 

                                    <td height="7" align="center"><table width="100%" border="0" align="center" cellpadding="2" cellspacing="5">

                                        <tr> 

                                          <td align="right"  valign="top" class="textnormal_bold">Your 

                                            Happy Mobile Number :</td>

                                          <td align="left" class="textnormalred"> 

                                            <!--SVLT.VAR:SUBR_NUMB-->

                                          </td>

                                        </tr>

                                        <tr> 

                                          <td width="45%"  align="right" valign="top" class="textnormal_bold">Your 

                                            Current Promotion :</td>

                                          <td align="left" class="textnormalred"> 
                                            <!--SVLT.VAR:CURRENT_PACK_DESC-->
                                          </td>
                                        </tr>
                                        <tr> 
                                          <td align="right" valign="top" class="textnormal_bold">Additional 
                                            Promotion :</td>
                                          <td align="left" class="textnormalred"> 
											<!--SVLT.VAR:SPECAIL_PACK_DESC-->
                                             <!--SVLT.VAR:PACK_END_DTTM-->
                                          </td>
                                        </tr>
                                      </table></td>
                                  </tr>
                                  <tr> 
                                    <td height="8" align="center" bgcolor="#FAF9F4">&nbsp;</td>
                                  </tr>
                                  <tr> 
                                    <td height="8" align="center" bgcolor="#FAF9F4">&nbsp;</td>
                                  </tr>
                                  <tr> 
                                    <td height="8" align="center" bgcolor="#FAF9F4" id="add">
									<table width="80%" border="0" align="center" cellpadding="0" cellspacing="0" style="display:<!--SVLT.VAR:displayOneSpecial-->">
                                        <!--SVLT.LOOP:ADD_SPECIAL_NO-->
										<tr> 
                                          <td width="60%" align="right" class="textnormal_bold">Please fill your Happy Special Number  :<br>
                                            (08xxxxxxxx)&nbsp;&nbsp;</td>
                                          <td width="47%" align="left" class="textnormalred"> 
                                            <span class="textnormal"> 
                                            <input type="text" size="15" maxlength="10" name="txtSpecialNoAdd" autocomplete="off">
                                            </span> </td>
                                        </tr>
										<!--SVLT.END:ADD_SPECIAL_NO-->
                                      </table>
                                      <table width="80%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#999999" style="display:<!--SVLT.VAR:displayManySpecial-->">
                                        <tr bgcolor="#0099CC" align="center"> 
                                          <td height="30" bgcolor="#FF0000" class="textnormalwhite"><strong>Item 
                                            No.</strong></td>
                                          <td  bgcolor="#FF0000" class="textnormalwhite"><strong>Please 
                                            fill your Happy Special Number (08xxxxxxxx)</strong></td>
                                        </tr>
                                        <!--SVLT.LOOP:ADD_SPECIAL_NO-->
                                        <tr bgcolor="#FAF9F4"> 
                                          <td width="20%" align="center" class="textnormal"> 
                                            <!--SVLT.VAR:AddNo-->
                                          </td>
                                          <td width="70%" align="left" class="textnormal"> 
                                            &nbsp;&nbsp;&nbsp; <input type="text" size="15" maxlength="10" name="txtSpecialNoAddMany" autocomplete="off" value="<!--SVLT.VAR:SpecialNoAddMany-->"> 
                                          </td>
                                        </tr>
                                        <!--SVLT.END:ADD_SPECIAL_NO-->
                                      </table>
                                      <br> <table  width="80%" border="0" align="center" cellpadding="0" cellspacing="0" >

                                        <!--SVLT.LOOP:DTAC_ONLY_FLAG-->

                                        <tr> 

                                          <TD class="textnormalred">** Happy 

                                            Special Number must be a dtac number.</TD>

                                        </tr>

                                        <!--SVLT.END:DTAC_ONLY_FLAG-->

                                        <!--SVLT.LOOP:SHOW_FREE-->

                                        <tr> 

                                          <TD class="textnormalred">The service 

                                            fee for changing Happy Special Number 

                                            is&nbsp; 

                                            <!--SVLT.VAR:FEE_AMNT-->

                                            &nbsp;Baht/number.</TD>

                                        </tr>

                                        <!--SVLT.END:SHOW_FREE-->

                                      </table>

                                      <br> <br> <table width="250" border="0" align="center" cellpadding="5" cellspacing="0">

                                        <tr align="center" valign="top"> 

                                          <td><a href="javascript:doSubmit()"><img src="${RESOURCE}/eng/images/14_webservice_submit.gif" width="58" height="23" border="0"></a></td>

                                        </tr>

                                      </table></td>

                                  </tr>

                                  <tr> 

                                    <td height="8" align="center" bgcolor="#FAF9F4" id="edit"><table width="80%" border="0" align="center" cellpadding="2" cellspacing="5">

                                        <tr> 

                                          <td width="45%" height="30" align="left" class="textnormal_bold">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Currently, 

                                            you have <span class="textnormalred"> 

                                            <!--SVLT.VAR:EXIST_SPECIAL_NO-->

                                            </span> special number (s).</td>

                                        </tr>

                                        <tr> 

                                          <td align="center" class="textnormal_bold">
										  <table width="90%" border="0" cellpadding="0" cellspacing="1" bgcolor="#999999">
                                              <tr bgcolor="#0099CC"> 
                                                <td width="50" height="30" align="center" bgcolor="#FF0000"><span class="textnormalwhite"><strong>Item 

                                                  No.</strong></span></td>

                                                <td height="30" align="center" bgcolor="#FF0000" class="textnormalwhite"><strong>Special 

                                                  Number</strong></td>

                                                <td width="100" height="30" align="center" bgcolor="#FF0000">&nbsp;</td>

                                              </tr>

                                              <!--SVLT.LOOP:EXIST_SPECIAL_NO_LIST-->

                                              <tr class="textnormal" bgcolor="#FAF9F4"> 

                                                <td align="center"> 

                                                  <!--SVLT.VAR:NO-->

                                                </td>

                                                <td>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; 
                                                  <!--SVLT.VAR:SUBR_NUMB_SHOW-->
                                                </td>

                                                <td align="center"><a href="javascript:showEditSpecialNo(<!--SVLT.VAR:NO-->);" ><img src="${RESOURCE}/eng/images/14_webservice_edit.gif" border="0" vspace="4"></a> 

                                                  <input type="hidden" size="15" maxlength="10" name="specialNo" autocomplete="off" value="<!--SVLT.VAR:SUBR_NUMB-->" disabled></td>

                                              </tr>

                                              <!--SVLT.END:EXIST_SPECIAL_NO_LIST-->

                                              <!--SVLT.LOOP:NEW_SPECIAL_NO_LIST-->

                                              <tr class="textnormal" bgcolor="#FAF9F4"> 

                                                <td align="center"> 

                                                  <!--SVLT.VAR:NO-->

                                                </td>

                                                <td>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; 08-xxxx-xxxx</td>

                                                <td align="center"><a href="javascript:showAddSpecialNo(<!--SVLT.VAR:NO-->);" ><img src="${RESOURCE}/eng/images/14_webservice_add.gif" border="0" vspace="4"></a> 

                                                  <input type="hidden" size="15" maxlength="10" name="specialNo" autocomplete="off" value=""  disabled></td>

                                              </tr>

                                              <!--SVLT.END:NEW_SPECIAL_NO_LIST-->

                                            </table>

                                            <table Id="tbShowDTACFlagOnly" name="tbShowDTACFlagOnly"  width="90%" border="0" align="center" cellpadding="0" cellspacing="0" style="display : none;">

                                              <tr> 

                                                <TD>&nbsp;</TD>

                                              </tr>

                                              <!--SVLT.LOOP:DTAC_ONLY_FLAG-->

                                              <tr> 

                                                <TD class="textnormalred">** Happy Special 
                                            Number must be a dtac number.</TD>

                                              </tr>

                                              <!--SVLT.END:DTAC_ONLY_FLAG-->

                                            </table>

                                            <table Id="tbEditFee" name="tbEditFee"  width="90%" border="0" align="center" cellpadding="0" cellspacing="0" style="display : none;">

                                              <!--SVLT.LOOP:SHOW_FREE-->

                                              <tr> 

                                                <TD class="textnormalred">The service 
                                            fee for changing Happy Special Number 
                                            is&nbsp;<!--SVLT.VAR:FEE_AMNT--> &nbsp;Baht/number.</TD>

                                              </tr>

                                              <!--SVLT.END:SHOW_FREE-->

                                            </table>

                                            <table Id="tbAddFee" name="tbAddFee"  width="90%" border="0" align="center" cellpadding="0" cellspacing="0" style="display : none;">

                                              <!--SVLT.LOOP:SHOW_FREE-->

                                              <tr> 

                                                <TD class="textnormalred">Adding 
                                                  special number fee is &nbsp;<!--SVLT.VAR:FEE_AMNT-->&nbsp;Baht/number.</TD>

                                              </tr>

                                              <!--SVLT.END:SHOW_FREE-->

                                            </table>

                                            <table Id="tbEditSpecialNo" name="tbEditSpecialNo" width="90%" border="0" align="center" cellpadding="0" cellspacing="0" style="display : none;">

                                              <tr> 

                                                <TD align="right" width="60%">&nbsp;</TD>

                                                <TD width="46%">&nbsp;</TD>

                                              </tr>

                                              <tr> 

                                                <TD align="right" class="textnormal_bold">Please fill your Happy Special Number  :<br>
                                            (08xxxxxxxx)&nbsp;&nbsp;
                                                  </TD>

                                                <TD><span class="textnormal"> 

                                                  <input type="text" size="15" maxlength="10" name="txtEditSpecialNo" autocomplete="off" value="">

                                                  <input type="hidden" name="selectedRow"  value="" size="3">

                                                  </span></TD>

                                              </tr>

                                              <tr> 

                                                <TD>&nbsp;</TD>

                                                <TD>&nbsp;</TD>

                                              </tr>

                                            </table>

                                            <table  Id="tbEditSpecialNoBtn" name="tbEditSpecialNoBtn"  width="90%"  border="0"  align="center"   style="display : none;">

                                              <tr > 

                                                <TD align="middle"> <a href="javascript:editSpecialNo();"><img alt="Change" src="${RESOURCE}/eng/images/14_webservice_edit.gif"  border="0"></a> 

                                                  <a href="javascript:cancelAdd()"><img alt="Cancel" src="${RESOURCE}/eng/images/14_webservice_cancel.gif"  border="0"></a> 

                                                </TD>

                                              </tr>

                                            </table>

                                            <table  Id="tbAddSpecialNoBtn" name="tbAddSpecialNoBtn"  width="90%"  border="0"  align="center"   style="display : none;">

                                              <tr > 

                                                <TD align="middle"> <a href="javascript:addSpecialNo();"><img alt="Add" src="${RESOURCE}/eng/images/14_webservice_add.gif"  border="0"></a> 

                                                  <a href="javascript:cancelAdd()"><img alt="Cancel" src="${RESOURCE}/eng/images/14_webservice_cancel.gif"  border="0"></a> 

                                                </TD>

                                              </tr>

                                            </table></td>

                                        </tr>

                                      </table></td>

                                  </tr>

                                  <!--SVLT.VAR:CONF_BOTTOM-->

                                </table>





<br>

<br>

   <!--SVLT.LOOP:DTAC_ONLY_FLAG-->

<script language="javascript">

   document.getElementById("tbEditSpecialNo").rows[1].cells[0].innerHTML = "<span class='textnormal_bold'>Please fill  your special phone number :<br>(08xxxxxxxx)&nbsp;&nbsp;</span>";

</script>

<!--SVLT.END:DTAC_ONLY_FLAG-->

</form>
						
						
						</div>
						
						
						
						</td>
                 	</tr>
              	</table>                
                <!--เนื้อหาสิ้นสุดที่นี่-->
                
            </div>
            <div class="content-bottom"></div>
        </div>
    </div>
</div>
<div id="footer">
<img src="${RESOURCE}/eng/images/copy_right.jpg" />
<a href="http://www.dtac.co.th" target="_blank"><img src="${RESOURCE}/eng/images/dtact_logo.jpg" border="0" /></a>
<a href="http://www.happyvirus.com" target="_blank"><img src="${RESOURCE}/eng/images/virus_icon.jpg" border="0" /></a>
</div>



<script type="text/JavaScript">  
document.getElementById ("add").style.display="";
document.getElementById ("edit").style.display="";
		if ("<!--SVLT.VAR:MODE-->" == "firstADD"){
			//document.getElementById ("add").style.display="";
			document.getElementById ("edit").style.display="none";
		 }else{
			//document.getElementById ("edit").style.display="";
			document.getElementById ("add").style.display="none";

		}
var d = document.form1;
var focus = "<!--SVLT.VAR:focus-->";
if ("<!--SVLT.VAR:MODE-->" == "firstADD"){
       if ("<!--SVLT.VAR:displayManySpecial-->" != "none"){
	if (focus != "" ){
		d.txtSpecialNoAddMany[focus].focus();
		d.txtSpecialNoAddMany[focus].select();
	}else{
		d.txtSpecialNoAddMany[0].focus();
		//d.txtSpecialNoAddMany[0].select();
	}
		
      }else{
	d.txtSpecialNoAdd.focus();
	}
}
</script>

</body>
</html>
